#include <cstdio>
#include <cmath>
using namespace std;

int main(){
  double w,h;
  double X;

  scanf("%lf%lf",&w,&h);
  double pi=acos(-1.0f);
  X=w/h;
  double sqX=X*X;

  double F=2/(pi*sqX) * (log((1+sqX)/sqrt(1+2*sqX))
			 +2*X*sqrt(1+sqX) * atan(X/sqrt(1+sqX))
			 -2*X*atan(X));
  printf("%f\n",F);
  return 0;
}

